home *** CD-ROM | disk | FTP | other *** search
- /*
- Greg's Hack — MacHack '95 Best Hack Contest (22-24 June 1995 )
- Copyright © 1995 Gregory D. Landweber, ALL RIGHTS RESERVED
- */
-
- #include <A4Stuff.h>
- #include "AntiAlias.h"
-
- UniversalProcPtr oldDrawString;
- UniversalProcPtr oldDrawText;
- UniversalProcPtr oldDrawChar;
-
- ProcInfoType __procinfo = kCStackBased;
-
- void main ( void )
- {
- UniversalProcPtr _MyDrawString;
- UniversalProcPtr _MyDrawText;
- UniversalProcPtr _MyDrawChar;
-
- Handle me = Get1Resource ( 'INIT', 1000 );
- THz oldZone = GetZone();
-
- EnterCodeResource();
-
- SetZone ( SystemZone() );
-
- if ( me && !Button() && AntiAlias() ) {
- DetachResource ( me );
-
- oldDrawString = GetToolTrapAddress ( _DrawString );
- oldDrawText = GetToolTrapAddress ( _DrawText );
-
- _MyDrawString = NewRoutineDescriptor ( (ProcPtr)MyDrawString, uppDrawStringProcInfo, GetCurrentISA() );
- _MyDrawText = NewRoutineDescriptor ( (ProcPtr)MyDrawText, uppDrawTextProcInfo, GetCurrentISA() );
- _MyDrawChar = NewRoutineDescriptor ( (ProcPtr)MyDrawChar, uppDrawCharProcInfo, GetCurrentISA() );
-
- SetToolTrapAddress ( _MyDrawString, _DrawString );
- SetToolTrapAddress ( _MyDrawText, _DrawText );
- // SetToolTrapAddress ( _MyDrawChar, _DrawChar );
- }
-
- SetZone ( oldZone );
-
- ExitCodeResource();
- }